<include file="Public:head_nav" />
<script type="text/javascript" src="__JS__/jquery.idTabs.min.js"></script>
<div class="content">
<div class="search">
    <div class="search_1">
        <select name="select" id="select">
            <option value="{:U('House/index')}">新房</option>
            <option value="{:U('Used/index')}">二手</option>
            <option value="{:U('Rental/index')}">出租</option>
            <option value="{:U('Estate/index')}">小区</option>
            <option value="{:U('News/index')}">资讯</option>
            <option value="{:U('Ask/index')}">问答</option>
        </select>
    </div>
    <div class="search_2">
        <input name="key" type="text" class="search_2_input" id="key" placeholder="请输入关键词搜索">
    </div>
    <div class="search_3">
        <input class="search_3_but" type="submit" name="button" id="button" value="搜索">
    </div>
</div>

<div class="menu overflow_h">
    <ul>
        <li><a href="{:U('House/index')}"><span class="menuico menuico01_1"></span><span class="li_span">新房</span></a></li>
        <li><a href="{:U('Used/index')}"><span class="menuico menuico01_2"></span><span class="li_span">二手房</span></a></li>
        <li><a href="{:U('Rental/index')}"><span class="menuico menuico01_3"></span><span class="li_span">租房</span></a></li>
        <li><a href="{:U('Estate/index')}"><span class="menuico menuico01_4"></span><span class="li_span">小区</span></a></li>
        <li><a href="{:U('Buying/index')}"><span class="menuico menuico01_5"></span><span class="li_span">团购</span></a></li>
        <li><a href="{:U('Activity/index')}"><span class="menuico menuico01_6"></span><span class="li_span">活动</span></a></li>
        <li><a href="{:U('Ask/index')}"><span class="menuico menuico01_7"></span><span class="li_span">问答</span></a></li>
        <li><a href="{:U('News/index')}"><span class="menuico menuico01_8"></span><span class="li_span">资讯</span></a></li>
    </ul>
</div>

<div class="slider">
    <ul>
        <volist name='img_list' id='vo'>
            <li><a href="{$vo.url}"><img src="{$vo.img}"></a></li>
        </volist>
    </ul>
</div>
<script type="text/javascript" src="__JS__/yxMobileSlider.js"></script>
<script>
    $(".slider").yxMobileSlider({width:640,height:320,during:3000})
</script>

<div class="div_box">
    <h1 class="h1_title"><span class="h1_title_t">活动专区</span><span class="more"><a href="{:U('Activity/index')}">更多 ></a></span></h1>
    <div class="houses_inf">
        <span class="title_t"><a href="{:U('Activity/detail',array('id'=>$activity[0]['id']))}">{$activity[0]['title']}</a></span>
        <p>{:msubstr($activity[0]['desc'],0,58)}<<a href="{:U('Activity/detail',array('id'=>$activity[0]['id']))}" class="org">查看详细</a>></p>

        <span class="title_t"><a href="{:U('Activity/detail',array('id'=>$activity[1]['id']))}">{$activity[1]['title']}</a></span>
        <p>{:msubstr($activity[1]['desc'],0,58)}<<a href="{:U('Activity/detail',array('id'=>$activity[1]['id']))}" class="org">查看详细</a>></p>

        <ul>
            <volist name="activity" id="vo" offset="2" length='7'>
            <li><a href="{:U('Activity/detail',array('id'=>$vo['id']))}"><span class="org">【{$activity_cate[$vo['cate_id']]}】</span>{$vo.title}</a></li>
            </volist>
        </ul>
    </div>
</div>

<div class="div_box01">
    <div class="tab_title overflow_h">
        <ul class="idTabs">
            <li><a href="#tab01" class="selected">热销楼盘</a></li>
            <li><a href="#tab02">最新楼盘</a></li>
            <li><a href="#tab03">推荐楼盘</a></li>
        </ul>
    </div>
    <div class="houses_hot" id="tab01">
        <ul>
            <volist name="pos_list[16]" id='vo'>
                <li class="overflow_h">
                    <a href="{:U('House/detail',array('id'=>$vo['data']['id']))}" class="pics"><img src="{$vo.img}" width="100" height=""></a>
                    <dl>
                        <dt style="height:30px;"><a style="color:#ff6600;" href="{:U('House/detail',array('id'=>$vo['data']['id']))}">[{$vo.add1}]</a><a href="{:U('House/detail',array('id'=>$vo['data']['id']))}">{$vo.title}</a></dt>
                        <dd><em style="color: #ff6600">优惠:</em>{$vo.discount}<b class="b_top">{$vo.price}元/㎡</b></dd>
                        <dd class="ellipsis"><LABEL>地址：</LABEL>{$vo.address}</dd>
                    </dl>
                </li>
            </volist>

        </ul>
        <div class="houses_more"><a href="{:U('House/index')}">更多精品楼盘>></a></div>
    </div>

    <div class="houses_hot" id="tab02" style="display:none">
        <ul>
            <volist name="pos_list[17]" id='vo'>
                <li class="overflow_h">
                    <a href="{:U('House/detail',array('id'=>$vo['data']['id']))}" class="pics"><img src="{$vo.img}" width="100" height=""></a>
                    <dl>
                        <dt style="height:30px;"><a style="color:#ff6600;" href="{:U('House/detail',array('id'=>$vo['data']['id']))}">[{$vo.add1}]</a><a href="{:U('House/detail',array('id'=>$vo['data']['id']))}">{$vo.title}</a></dt>
                        <dd><em style="color: #ff6600">优惠:</em>{$vo.discount}<b class="b_top">{$vo.price}元/㎡</b></dd>
                        <dd class="ellipsis"><LABEL>地址：</LABEL>{$vo.address}</dd>
                    </dl>
                </li>
            </volist>
        </ul>
        <div class="houses_more"><a href="{:U('House/index')}">更多精品楼盘>></a></div>
    </div>

    <div class="houses_hot" id="tab03" style="display:none">
        <ul>
            <volist name='rec_house' id='vo'>
            <php>  $arr = getHouseSet($vo); </php>
            <li class="overflow_h">
                <a href="{:U('House/detail',array('id'=>$vo['id']))}" class="pics"><img src="{$vo.img}" width="100" height=""></a>
                <dl>
                    <dt style="height:30px;"><a style="color:#ff6600;" href="{:U('House/detail',array('id'=>$vo['id']))}">[{$arr['address'][0]}]</a><a href="{:U('House/detail',array('id'=>$vo['id']))}">{$vo.title}</a></dt>
                    <dd><em class="sa_star_1"><i class="sa_d10"></i></em><a style="color:#ff6600;"  href="{:U('House/ask',array('hid'=>$vo['id']))}">{$arr.ask_count}条问答</a><b class="b_top">{$vo.average_price}元/㎡</b></dd>
                    <dd class="ellipsis"><LABEL>地址：</LABEL>{$arr['address'][1]}</dd>
                </dl>
            </li>
            </volist>
        </ul>
        <div class="houses_more"><a href="{:U('House/index')}">更多精品楼盘>></a></div>
    </div>
</div>

<div class="div_box">
    <h1 class="h1_title"><span class="h1_title_t">新闻资讯</span>
        <span class="more">
           <volist name='article_cate' id='vo'>
               &nbsp;&nbsp; <a href="{:U('News/lists',array('alias'=>$vo['alias']))}">{$vo.name}</a>
           </volist>
        </span></h1>
    <div class="houses_inf">
        <ul>
            <volist name='news_list' id='vo'>
                <li><a href="{:U('News/detail',array('id'=>$vo['id']))}"><span class="org">【{$news_cate[$vo['cate_id']]}】</span>{$vo.title}</a></li>
            </volist>
        </ul>
        <div class="houses_more"><a href="{:U('News/index')}">查看更多新闻资讯>></a></div>
    </div>
</div>

<div class="renz">认证房源</div>
<div class="div_box01">
    <div class="s_h_title overflow_h"><ul class="idTabs"><li><a href="#fang01" class="selected">二手房</a></li><li><a href="#fang02">租房</a></li></ul></div>
    <div class="houses_hot" id="fang01">
        <ul>
            <volist name='rec_used' id='vo'>
            <li class="overflow_h">
                <a href="{:U('Used/detail',array('id'=>$vo['id']))}" class="pics"><img src="{$vo.img}" width="100" height=""></a>
                <div class="i_s_h">
                    <div class="i_s_h_t1"><a style="color:#ff6600;" href="{:U('Used/detail',array('id'=>$vo['id']))}">[{$area_cate[$vo['area_id']]}]</a><a href="{:U('Used/detail',array('id'=>$vo['id']))}">{$vo.title}</a></div>
                    <div class="i_s_h_t2">{$vo.address}</div>
                    <div class="i_s_h_t2">{$vo.room}室{$vo.hall}厅 {$vo.area}㎡</div>
                    <span class="jiao1">{$vo.total_price}万</span><span class="jiao2"><a href="tel:{$vo.phone}">{$vo.phone}</a></span>
                </div>
            </li>
            </volist>
        </ul>
        <div class="houses_more"><a href="{:U('Used/index')}">更多二手房源>></a></div>
    </div>

    <div class="houses_hot" id="fang02" style="display:none">
        <ul>
            <volist name='rec_rental' id='vo'>
            <li class="overflow_h">
                <a href="{:U('Rental/detail',array('id'=>$vo['id']))}" class="pics"><img src="{$vo.img}" width="100" height=""></a>
                <div class="i_s_h">
                    <div class="i_s_h_t1"><a style="color:#ff6600;" href="{:U('Rental/detail',array('id'=>$vo['id']))}">[{$area_cate[$vo['area_id']]}]</a><a href="{:U('Rental/detail',array('id'=>$vo['id']))}">{$vo.title}</a></div>
                    <div class="i_s_h_t2">{$vo.address}</div>
                    <div class="i_s_h_t2">{$vo.room}室{$vo.hall}厅 {$vo.area}㎡</div>
                    <span class="jiao1">{$vo.price}元/月</span><span class="jiao2"><a href="tel:{$vo.phone}">{$vo.phone}</a></span>
                </div>
            </li>
            </volist>
        </ul>
        <div class="houses_more"><a href="{:U('Rental/index')}">更多出租房源>></a></div>
    </div>

</div>

<div class="div_box">
    <h1 class="h1_title"><span class="h1_title_t">在线问答</span><span class="more"><a href="{:U('Ask/index')}">更多 ></a></span></h1>
    <div class="houses_inf">
        <ul id='ask_list'>
        <volist name="ask_list['list']" id='vo'>
            <li><a href="{:U('Ask/detail',array('id'=>$vo['id']))}"><span class="org">【{$vo.name}】</span>{$vo.title}</a></li>
        </volist>
        </ul>
    </div>
    <div class="index_but"><span class="index_but_w float_l"><a href="javascript:;" data-bid="1" id="ask_tab" class="but01">换一换</a></span><span class="index_but_w float_r"><a href="{:U('Ask/add')}" class="but01">我要提问</a></span></div>
</div>

<include file="Public:footer_nav" />
</div>
<script type="text/javascript" src="__H__/js/layer/layer.js"></script>
<script type="text/javascript" src="__JS__/public.js"></script>
<script type="text/javascript">
    $(".search_3_but").click(function(){
        var s = $("#select").val();
        var k = $("#key").val();
        if(k==''){
            msg_show('请输入搜索关键词');
            return false;
        }
        var url = s+'&key='+k;
        window.location.href = url;
    });
    $("#ask_tab").click(function(){
        var bid = $(this).attr('data-bid');
        //请求ajax
        $.ajax({
            type: "post",
            url : "{:U('Ajax/getAsk')}",
            dataType:'json',
            data:{bid:bid},
            success: function(json){
                if(json.status==1){
                    $("#ask_list").empty();
                    $("#ask_list").append(json.html);
                    $("#ask_tab").attr('data-bid',json.bid);
                }else{
                    msg_show(json.msg,2)
                }
            }
        });
    });
</script>
<include file="Public:footer" />
